package com.eiss.controller;

import com.eiss.common.core.domain.AjaxResult;
import com.eiss.domain.DTO.stationUser;
import com.eiss.domain.VO.RegisterVO;
import com.eiss.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/getstationuser")
    public List<stationUser> StationUserController(){
        return userService.getStationUser();
    }

    @GetMapping("/getTransferStationUser")
    public List<stationUser> TransferStationUserController(){
        return userService.getTransferStationUser();
    }

    @PostMapping("/register")
    public AjaxResult register(@RequestBody  RegisterVO registerVO) {
        log.info("注册信息:{}",registerVO);
        return  userService.register(registerVO);
    }
}
